<?php 
session_start();
	ob_start();
require_once 'libararries/connect.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="public/css/style.css" />
<script type="text/javascript" src="public/js/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="public/css/menu_ngang.css" />
<script type="text/javascript" src="public/js/ddaccordion.js"></script>
<script type="text/javascript" src="public/js/menu_doc.js"></script>
<link rel="stylesheet" type="text/css" href="public/css/menu_doc.css" />
<script src="public/magiczoomplus/magiczoomplus.js" type="text/javascript"></script>
<link href="public/magiczoomplus/magiczoomplus.css" rel="stylesheet" type="text/css" media="screen"/>
<script type="text/javascript" src="public/jquery-validate/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="public/jquery-validate/jquery.validate.min.js"></script>
	<script type="text/javascript" src="public/jquery-validate/localization/messages_vi.js"></script>
	<script type="text/javascript" src="public/jquery-validate/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="public/jquery-validate/jquery.validate.min.js"></script>
	<script type="text/javascript" src="public/jquery-validate/localization/messages_vi.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#contact").validate({
				errorElement: "span", //Thành phần HTML hiện thông báo lỗi
				//Sử dụng tùy chọn rules cho những validate không hỗ trợ bởi class name
				rules: {
					nlmk: {
						equalTo: "#password" //So sánh với trường cpassword với thành trường có id là password
					},
					cemail: {
						equalTo: "#email" //So sánh với trường cemail với thành trường có id là email
					},
					<?php
					echo $_SESSION['security_code'];?>:{
						equalTo: "#txtCaptcha" 
					},
					min_field: { min: 5 }, //Giá trị tối thiểu
					max_field: { max : 10 }, //Giá trị tối đa
					range_field: { range: [4,10] }, //Giá trị trong khoảng từ 4 - 10
					rangelength_field: { rangelength: [4,10] } //Chiều dài chuỗi trong khoảng từ 4 - 10 ký tự
				}
			});
		});
	</script>
 <script type="text/javascript">
            MagicZoomPlus.options = {
                'disable-expand': true,
                'hint-text': 'Zoom'
            }
        </script>

<title>Trang chủ</title>
</head>
<body>
	<div id="warper">
	<div id="containter_contain">
    	<div id="header">
    	<div id="banner">
    	<?php require_once 'controllers/main/controllers_banner.php';?>
    	</div>
        <div id="menu_search">
	 <!-- menu ngang -->
			<div id="menu">
           		<ul id="nav">
                     <li><span class="menu_left"></span><a href="index.php"><b>Trang chủ</b></a><span class="menu_right"></span></li>
                                
                    <li><span class="menu_left"></span><a href="index.php?mod=gioithieu"><b>Giới thiệu</b></a><span class="menu_right"></span></li>
                    <li><span class="menu_left"></span><a href="index.php?mod=tintuc"><b>Tin tức sự kiên</b></a><span class="menu_right"></span></li>
                    <li><span class="menu_left"></span><a href="index.php?mod=khuyenmai"><b>Khuyến mãi</b></a><span class="menu_right"></span></li>
                    <li><span class="menu_left"></span><a href="index.php?mod=lienhe"><b>Liên hệ</b></a><span class="menu_right"></span></li>
                </ul>
          	</div>
         <!-- end menu ngang -->
         <!-- tim kiem -->
					<?php require_once 'views/main/timkiem/index.php'; ?>
          </div>
         <!-- end -->
  </div><!--END header-->
    	<div id="than">
        	<div id="cottrai">
          	<?php 
			require_once 'controllers/main/controllers_menu.php';
			require_once 'controllers/main/controllers_hotro.php';
			require_once 'views/main/quangcao/left.php';
			?>
		
            </div><!--END cottrai-->
            <div id="cotgiua">          
            	 <?php if(isset($_GET['mod'])){?>
           			<?php 
           				switch ($_GET['mod'])
           				{
           					
           					case 'sanphambanchay':
           					case 'detail':
           					case 'sanpham':{
           						require_once 'controllers/main/controllers_sanpham.php';
           						break;
           					}
           					case 'delcart':
           					case 'dathang':
							{
								require_once 'controllers/main/controllers_dathang.php';
								break;
							}
							case 'giohang':
							
							{
								require_once 'controllers/main/controllers_giohang.php';
								break;
							}
           					case 'tintuc':
           					case 'detailtin':
           						{
           							require_once 'controllers/main/controllers_tin.php';
           							break;
           						}
           					case 'mua':
           					case 'thanhtoan':
           						{
           						require_once 'controllers/main/controllers_thanhtoan.php';
           						break;
           					           				
           					}
							case 'dangky':
							case 'dangkythanhcong':
							case 'suathongtincanhan':
							case 'capnhatthanhcong':
								{
								require_once 'controllers/main/controllers_dangky.php';
								break;
								}
							case 'timmathang':{
								
								require_once 'controllers/main/controllers_timkiem.php';
								break;
							}
           				case 'gioithieu':
           				case 'lienhe':
           					{
								
								require_once 'controllers/main/controllers_gioithieu.php';
								break;
							}
           				case 'huythanhcong':
           				case 'del_cthoadon':
           				case 'daduyet':
           				case 'chuaduyet':
						case 'capnhatthanhcong':
           				case 'editchitiethd':
           				case 'lichsugiaodich':
           				case 'chitiethoadon':
           				case 'tatca':{
           					require_once 'controllers/main/controllers_lichsugiaodich.php';
           					break;	
           				}
           				case 'listbinhluan':
           				case 'binhluanthanhcong':
           				case 'addcom':{
           					
           						require_once 'controllers/main/controllers_binhluan.php';
           						break;
           					}
           				case 'sanphamnam':
           				case 'sanphamnu':
           				case 'sanphamtreem':	
           					{
           						require_once 'controllers/main/controllers_sanphamnnte.php';
           						break;
           					}
           				case 'khuyenmai':{
           					require_once 'controllers/main/controllers_khuyenmai.php';
           						break;
           				}
           				
           				}

            	 }
           			
                   	else
                   		{
        					require_once 'controllers/main/controllers_sanphambanchay.php';
        					require_once 'views/main/sanphamnam/index.php';
        					require_once 'views/main/sanphamnu/index.php';
        					require_once 'views/main/sanphamtreem/index.php';
                   		}
       		?>
            </div><!--END cotgiua-->
            <div id="cotphai">
          
            	<?php 
            	include_once 'views/main/right/right.php';
				?>
            
            </div><!--END cotphai-->
        </div><!--END than-->
        <div id="footer">
        		<?php include 'views/main/footer/footer.php';?>
 
        </div><!--END footer-->
        </div>
    </div><!--END warper-->
</body>

</html>
<?php ob_end_flush();?>